*::after,
*::before {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80vh;
  background: #0b1111;
}

.cube {
  position: relative;
  width: 300px;
  height: 300px;
  transform-style: preserve-3d;
  transform: rotateX(-30px);
  animation: D1 8s linear infinite;
}

@keyframes D1 {
  0% {
    transform: rotateX(-15deg) rotateY(0);
  }
  100% {
    transform: rotateX(-15deg) rotateY(-360deg);
  }
}

.cube div {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.cube div span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  border: 2px solid #7dff99;
  transform: rotateY(calc(var(--i) * 90deg)) translateZ(150px);
}

.top {
  position: absolute;
  top: 0;
  left: 0;
  width: 300px;
  height: 300px;
  background: transparent;
  border: 2px solid #7dff99;
  transform: rotateX(90deg) translateZ(150deg);
}

.top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 300px;
  height: 300px;
  background: transparent;
  border: 2px solid #7dff99;
  transform: translateZ(-400px);
  filter: blur(30px);
  box-shadow: 0 0 120px rgb(125, 255, 153, 0.2),
    0 0 200px rgb(125, 255, 153, 0.4), 0 0 300px rgb(125, 255, 153, 0.6),
    0 0 400px rgb(125, 255, 153, 0=9);
}
